﻿using AJWPFAdmin.Core.Models.EF.Tables;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AJWPFAdmin.Services.EF.TableExts
{
    public class SystemDictionaryExt
    {
        public enum SystemDictionaryKey
        {
            货车 = 1,
            燃料,
            使用性质
        }

        public static Task<List<SystemDictionary>> GetSystemDictionariesAsync(DbService db, SystemDictionaryKey key)
        {
            var search = (int)key;

            return db.SystemDictionaries.Where(p => p.ParentId == search).ToListAsync();
        }
    }
}
